import axios from '@/utils/axios'

export function fetchCnode(params) {
  return axios({
    url: '/api/v1/topics',
    method: 'get',
    params
  })
}

export function fetchLogin(data) {
  return axios({
    url: '/api/v2/user/login',
    method: 'post',
    data
  })
}


// 获取用户信息接口
export function fetchgetinfo(params) {
  return axios({
    url: '/api/v2/user/getUserInfo',
    method: 'get',
    params
  })
}


// 获取商品列表
export function fetchgetlist(params) {
  return axios({
    url: '/api/v2/good/list',
    method: 'get',
    params
  })
}


export function fetchgetcates(params) {
  return axios({
    url: 'api/v2/good/allCates',
    method: 'get',
    params
  })
}
// 添加成员
export function fetchadduser(data) {
  return axios({
    url: 'api/v2/user/addUser',
    method: 'post',
    data
  })
}
// 获取用户列表
export function fetchuserlist(params) {
  return axios({
    url: 'api/v2/user/getUserList',
    method: 'get',
    params
  })
}

//上传商品接口
export function fetchgoodupoad(data) {
  return axios({
    url: 'api/v2/good/update',
    method: 'post',
    data
  })
}
// 获取商品详情
export function fetchgooddestail(params) {
  return axios({
    url: 'api/v2/good/info',
    method: 'get',
    params
  })
}




